﻿
Imports std
Imports centrosphere

Public Interface islice
    Function read(ByVal key As String,
                  ByVal result As pointer(Of bytes),
                  ByVal ts As pointer(Of Int64)) As eventComb
    Function write(ByVal key As String,
                   ByVal buff As bytes,
                   ByVal ts As Int64,
                   ByVal result As pointer(Of Boolean)) As eventComb
    Function uniqueWrite(ByVal key As String,
                         ByVal buff As bytes,
                         ByVal ts As Int64,
                         ByVal result As pointer(Of Boolean)) As eventComb
    Function delete(ByVal key As String, ByVal result As pointer(Of Boolean)) As eventComb
    Function seek(ByVal key As String, ByVal result As pointer(Of Boolean)) As eventComb
    Function list(ByVal result As pointer(Of vector(Of String))) As eventComb
    Function modify(ByVal key As String,
                    ByVal buff As bytes,
                    ByVal ts As Int64,
                    ByVal result As pointer(Of Boolean)) As eventComb
    Function sizeof(ByVal key As String, ByVal result As pointer(Of Int64)) As eventComb
    Function full(ByVal result As pointer(Of Boolean)) As eventComb
    Function empty(ByVal result As pointer(Of Boolean)) As eventComb
    Function retire(ByVal result As pointer(Of Boolean)) As eventComb
    Function capacity(ByVal result As pointer(Of Int64)) As eventComb
    Function valuesize(ByVal result As pointer(Of Int64)) As eventComb
    Function keycount(ByVal result As pointer(Of Int64)) As eventComb
    Function heartbeat(ByVal result As pointer(Of Boolean)) As eventComb
    Sub [stop]()
End Interface

Namespace storageJobConsumerInternal
    Public Interface iasyncslice
        Function read(ByVal key As String, ByVal result As pointer(Of bytes)) As eventComb
        Function write(ByVal key As String, ByVal buff As bytes, ByVal result As pointer(Of Boolean)) As eventComb
        Function delete(ByVal key As String, ByVal result As pointer(Of Boolean)) As eventComb
        Function seek(ByVal key As String, ByVal result As pointer(Of Boolean)) As eventComb
        Function list(ByVal result As pointer(Of vector(Of String))) As eventComb
        Function modify(ByVal key As String, ByVal buff As bytes, ByVal result As pointer(Of Boolean)) As eventComb
        Function sizeof(ByVal key As String, ByVal result As pointer(Of Int64)) As eventComb
        Function full(ByVal result As pointer(Of Boolean)) As eventComb
        Function empty(ByVal result As pointer(Of Boolean)) As eventComb
        Function retire(ByVal result As pointer(Of Boolean)) As eventComb
        Function capacity(ByVal result As pointer(Of Int64)) As eventComb
        Function valuesize(ByVal result As pointer(Of Int64)) As eventComb
        Function keycount(ByVal result As pointer(Of Int64)) As eventComb
        Function heartbeat(ByVal result As pointer(Of Boolean)) As eventComb
        Sub [stop]()
    End Interface

    Public Interface isyncslice
        Function read(ByVal key As String, ByRef result As bytes) As Boolean
        Function write(ByVal key As String, ByVal buff As bytes, ByRef result As Boolean) As Boolean
        Function delete(ByVal key As String, ByRef result As Boolean) As Boolean
        Function seek(ByVal key As String, ByRef result As Boolean) As Boolean
        Function list(ByRef result As vector(Of String)) As Boolean
        Function modify(ByVal key As String, ByVal buff As bytes, ByRef result As Boolean) As Boolean
        Function sizeof(ByVal key As String, ByRef result As Int64) As Boolean
        Function full(ByRef result As Boolean) As Boolean
        Function empty(ByRef result As Boolean) As Boolean
        Function retire(ByRef result As Boolean) As Boolean
        Function capacity(ByRef result As Int64) As Boolean
        Function valuesize(ByRef result As Int64) As Boolean
        Function keycount(ByRef result As Int64) As Boolean
        Function heartbeat(ByRef result As Boolean) As Boolean
        Sub [stop]()
    End Interface
End Namespace
